package com.easy.frame.servers.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 租户-菜单关联关系表
 *
 * @author zzf
 * @since 2020-12-15
 */
@Getter
@Setter
@ToString
@TableName(value = "sys_tenant_menu", autoResultMap = true)
@ApiModel("租户-菜单关联关系表")
public class SysTenantMenu implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("租户id")
    private Long tenantId;

    @ApiModelProperty("菜单id")
    private Long menuId;

    @ApiModelProperty("操作权限key数组")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> operations;

    @ApiModelProperty("创建人")
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

}
